Skip to content

GH-40097: [Go][FlightRPC] Enable disabling TLS - #40098

Merged
zeroshade merged 2 commits into
apache:mainfrom
waynr:flightsql/enable-disabling-tls
Feb 20, 2024
Merged

zeroshade merged 2 commits into
apache:mainfrom
waynr:flightsql/enable-disabling-tls

Conversation

@waynr

@waynr waynr commented Feb 15, 2024 •

Copy link
Copy Markdown
Contributor

See #40097 for more in-depth description
about the problem that led me to file this PR.

Rationale for this change

Because it's annoying to not be able to connect to a non-TLS flightsql endpoint
in my development environment just because my development environment happens
to still use token authentication.

What changes are included in this PR?

Thread the flightsql DriverConfig.TLSEnabled parameter into the
grpcCredentials type so that grpcCredentials.RequireTransportSecurity can
return false if TLS is not enabled on the driver config.

One thing that occurred to me about the DriverConfig.TLSEnabled field is that
its semantics seem very mildly dangerous since golang bool types are false
by default and golang doesn't require fields on structs to be explicitly
initialized. It seems to me that DriverConfig.TLSDisabled would be better (semantically speaking)
because then the API user doesn't have to explicitly enable TLS. But I suppose
it's probably undesirable to change the name of a public field on a public type.

Are these changes tested?

I haven't written any tests, mostly because there weren't already any tests for
the grpcCredentials type but I have manually verified this fixes the problem
I described in #40097 by rebuilding my
tool and running it against the non-TLS listening thing in my development
environment.

Are there any user-facing changes?

@waynr
waynr requested a review from zeroshade as a code owner February 15, 2024 23:04
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #40097 has been automatically assigned in GitHub to PR creator.

@kou kou changed the title GH-40097: [Go][FlightRPC] enable disabling tls GH-40097: [Go][FlightRPC] Enable disabling TLS Feb 16, 2024

@srebhan srebhan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @waynr!

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit a690088.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Go][FlightRPC] flightsql gRPC driver does not respect flightsql's DriverConfig.TLSEnabled field

4 participants